<template>
    <div class="costlimit">
        <div class="data-content">
            <Form :model="formdata" label-position="right" :label-width="180">
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额设定（深证）：">
                            上节点：<Input v-model="formdata.sz_limit" class="w70"/>元<br>
                            上节点：<Input v-model="formdata.sz_limit_down" class="w70"/>元
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>	成交金额上、下节点区间 收取相应佣金</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额上节点以上交易佣金（深证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sz_buy_base_up" class="w70"/> 元 费率（买入）
                                          <Input v-model="formdata.sz_buy_fee_up" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sz_sell_base_up" class="w70"/> 元 费率（卖出）
                                           <Input v-model="formdata.sz_sell_fee_up" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>深证成交金额上节点以上 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额上、下节点之间交易佣金（深证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sz_buy_base_down" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sz_buy_fee_down" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sz_sell_base_down" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sz_sell_fee_down" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>深证成交金额上节点和下节点之间 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额下节点以下交易佣金（深证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sz_buy_base_down_2" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sz_buy_fee_down_2" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sz_sell_base_down_2" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sz_sell_fee_down_2" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p> 深证成交金额下节点以下 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额设定（上证）：">
                            上节点：<Input v-model="formdata.sh_limit" class="w70"/>元<br>
                            上节点：<Input v-model="formdata.sh_limit_down" class="w70"/>元
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>成交金额上、下节点区间 收取相应佣金</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额上节点以上交易佣金（上证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sh_buy_base_up" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sh_buy_fee_up" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sh_sell_base_up" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sh_sell_fee_up" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>上证成交金额上节点以上 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额上、下节点之间交易佣金（上证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sh_buy_base_down" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sh_buy_fee_down" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sh_sell_base_down" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sh_sell_fee_down" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>上证成交金额上、下节点之间 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="成交金额下节点一下交易佣金（上证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sh_buy_base_down_2" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sh_buy_fee_down_2" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sh_sell_base_down_2" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sh_sell_fee_down_2" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>上证成交金额下节点以下 收取相应佣金设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="过户费（深证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sz_buy_base_transfer" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sz_buy_fee_transfer" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sz_sell_base_transfer" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sz_sell_fee_transfer" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>深证过户费收取设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="过户费（上证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sh_buy_base_transfer" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sh_buy_fee_transfer" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sh_sell_base_transfer" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sh_sell_fee_transfer" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>上证过户费收取设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="印花税（深证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sz_buy_base_stamp" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sz_buy_fee_stamp" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sz_sell_base_stamp" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sz_sell_fee_stamp" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>深证印花税收取设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="12">
                        <FormItem label="印花税（上证）：" prop="user_regex">
                            基础费用（买入） <Input v-model="formdata.sh_buy_base_stamp" class="w70"/> 元 费率（买入）
                            <Input v-model="formdata.sh_buy_fee_stamp" class="w70"/> % <br>
                            基础费用（卖出） <Input v-model="formdata.sh_sell_base_stamp" class="w70"/> 元 费率（卖出）
                            <Input v-model="formdata.sh_sell_fee_stamp" class="w70"/> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999 ercode">
                        <p>深证印花税收取设定</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="代理商佣金：" prop="cost_ret_max">
                            <Input v-model="formdata.cost_ret_max" /> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>设置代理商佣金最大限制<span class="cred">(您可以针对不同代理商设置不同的佣金比例)</span></p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="盈亏分成开关：" prop="profit_turn">
                            <Select v-model="formdata.profit_turn" placeholder="">
                                <Option value="1">代理参与盈亏</Option>
                                <Option value="0">代理不参与盈亏</Option>
                            </Select>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="最小卖出时间：" prop="sel_max_time">
                            <Input v-model="formdata.sel_max_time" /> 分钟
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>买入股票后间隔多少时间可以卖出</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="规定时间内卖出加收服务费：" prop="cost_sell_limit">
                            <Input v-model="formdata.cost_sell_limit" />
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>在最小卖出时间内卖出股票加收服务费(如:0.2=20%)</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="升跌买入限制：" prop="buy_sd">
                            <Input v-model="formdata.buy_sd" /> %不许买入
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="ST股升跌买入限制：" prop="st_buy_sd">
                            <Input v-model="formdata.st_buy_sd" /> %不许买入
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="成交额设置：" prop="turnover_min">
                            <Input v-model="formdata.turnover_min" /> 万元
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>当成交额小于设定值后禁止买入</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="最低充值额度：" prop="minmoney">
                            <Input v-model="formdata.minmoney" /> 元
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>必须为整数.</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="提现单笔手续费最少：" prop="withdraw_fee">
                            <Input v-model="formdata.withdraw_fee" /> 元
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>必须为整数.</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="提现续费费率：" prop="withdraw_fee_lv">
                            <Input v-model="formdata.withdraw_fee_lv" /> %
                        </FormItem>
                    </Col>
                    <Col span="12" class="c999">
                        <p>系统保证满足最低手续费的情况，进行费率计算</p>
                    </Col>
                </Row>


                <FormItem>
                    <Button type="primary" @click="handleSubmit()" :loading="send_loading">确定</Button>
                </FormItem>

            </Form>

        </div>
    </div>
</template>
<style>
    .costlimit .c999 p{
        line-height: 27px;
    }
    .costlimit .ivu-form-item{
        margin-bottom: 0;
    }
    .costlimit .ivu-input-wrapper ,.costlimit .ivu-select{
        width: 250px;
    }
    .costlimit .ivu-input-wrapper.w70{
        width: 70px;
    }
</style>
<script>
    import WrapperContent from '../../../components/wrapper-content.vue'
    import {
        getUserList,
        getUser,
        getLevelList,
        getPositionList,
        doUserInfo,
        delUser,
        changeUserState
    } from "@/api/user";
    import * as utils from '../../../assets/js/utils'
    import $ from 'jquery'
    import _ from 'lodash'

    export default {
        components: {
            WrapperContent
        },
        data() {
            return {
                loading: false,
                formdata: {
                    sz_limit:'',
                    sz_limit_down:'',
                    sz_buy_base_up:'',
                    sz_buy_fee_up:'',
                    sz_sell_base_up:'',
                    sz_sell_fee_up:'',
                    sz_buy_base_down:'',
                    sz_buy_fee_down:'',
                    sz_sell_base_down:'',
                    sz_sell_fee_down:'',
                    sz_buy_base_down_2:'',
                    sz_buy_fee_down_2:'',
                    sz_sell_base_down_2:'',
                    sz_sell_fee_down_2:'',
                    sh_limit:'',
                    sh_limit_down:'',
                    sh_buy_base_up:'',
                    sh_buy_fee_up:'',
                    sh_sell_base_up:'',
                    sh_sell_fee_up:'',
                    sh_buy_base_down:'',
                    sh_buy_fee_down:'',
                    sh_sell_base_down:'',
                    sh_sell_fee_down:'',
                    sh_buy_base_down_2:'',
                    sh_buy_fee_down_2:'',
                    sh_sell_base_down_2:'',
                    sh_sell_fee_down_2:'',
                    sz_buy_base_transfer:'',
                    sz_buy_fee_transfer:'',
                    sz_sell_base_transfer:'',
                    sz_sell_fee_transfer:'',
                    sh_buy_base_transfer:'',
                    sh_buy_fee_transfer:'',
                    sh_sell_base_transfer:'',
                    sh_sell_fee_transfer:'',
                    sz_buy_base_stamp:'',
                    sz_buy_fee_stamp:'',
                    sz_sell_base_stamp:'',
                    sz_sell_fee_stamp:'',
                    sh_buy_base_stamp:'',
                    sh_buy_fee_stamp:'',
                    sh_sell_base_stamp:'',
                    sh_sell_fee_stamp:"",
                    cost_ret_max:'',
                    profit_turn:'1',
                    sel_max_time:'',
                    cost_sell_limit:'',
                    buy_sd:'',
                    st_buy_sd:'',
                    turnover_min:'',
                    minmoney:"",
                    withdraw_fee:'',
                    withdraw_fee_lv:'',
                },
                send_loading: false,
            }
        },
        created: function () {
            this.loading = false;
        },
        methods: {
            handleSubmit() {
                this.send_loading = true;
                setTimeout(() => {
                    this.send_loading = false;
                }, 2000)
            },
        }
    }
</script>





























